package game.components;

import game.scene.MatchScene;

import java.awt.Color;
import java.awt.Font;

import com.uqbar.vainilla.DeltaState;
import com.uqbar.vainilla.GameComponent;
import com.uqbar.vainilla.appearances.Label;

public class Annunciator extends GameComponent<MatchScene> {
	
	private Label announcement = new Label(new Font("Book Antiqua", Font.PLAIN, 70), Color.BLUE, "");

	public void changeAnnouncement(String text) {
		this.getAnnouncement().setText(text);
		this.setAppearance(this.getAnnouncement());
	}
	
	@Override
	public void update(DeltaState deltaState) {
		super.update(deltaState);
		
		this.setX(this.getScene().getCamera().getX());
		this.setY(this.getScene().getCamera().getY() + this.getScene().getCamera().getHeight() / 2);
	}
	
	
	

	public Label getAnnouncement() {
		return announcement;
	}

	public void setAnnouncement(Label announcement) {
		this.announcement = announcement;
	}
}
